package main

import "fmt"

func getSequence() func() int {
	counter := 0
	return func() int {
		counter += 1
		return counter
	}
}

func main() {
	nextNumber := getSequence()
	fmt.Println(nextNumber())
	fmt.Println(nextNumber())

	newNumber := getSequence()
	fmt.Println(newNumber())
	fmt.Println(newNumber())
}
